var orgData = _appConfigs.getUserData().userOrgs;
$('#laborCollectGrid').datagrid({    
    url:'collect/management/getLaborCollectList',  
//    idField:'streetName',
    rownumbers:true,
    fit:true,
    fitColumns:true,
    singleSelect:true,
//    nowrap:false,
    striped:true,
    /*frozenColumns: [[    
                     {field:'streetName', title:'街道名称', width:100, align:'center', sortable:true}    
                 ]], */ 
    columns:[[
              {field:'streetName', title:'街道名称', width:100, rowspan:3, align:'center'},
            	    /*formatter:function(data){
            	    	return "<a id='streetId' href='collect/management/laborCollect_street' style='text-decoration:none;' target='_self' >"+data+"</a>";
            	    }},*/
              {field:'laborNumInAge', title:'户籍劳动年龄<br/>内人口总数', width:90, rowspan:3, align:'center'},
              {title:'目前状况', colspan:8, align:'center'}, 
              {field:'employedRate', title:'就业率', width:85, rowspan:3, align:'center'},
              {field:'companyRate', title:'单位就业率', width:85, rowspan:3, align:'center'}
            ],[
              {title:'就业人员情况', colspan:5, align:'center'},
              {field:'unJobPeople', title:'无业求职人员', width:90, rowspan:2, align:'center'},    
              {field:'undesirePeople', title:'无就业愿望人员', width:90, rowspan:2, align:'center'},
              {field:'loseTouchPeople', title:'失联人员', width:85, rowspan:2,align:'center'}
            ],[
               {field:'subTotal', title:'小计', width:85, align:'center'},    
               {field:'company', title:'单位就业', width:85, align:'center'},
               {field:'flexibleEmployed', title:'灵活就业', width:85, align:'center'},    
               {field:'selfEmployed', title:'自主创业', width:85, align:'center'},
               {field:'individualOperation', title:'个体经营', width:85, align:'center'}
            ]]
}); 

function laborStreet(){
	var rowData = $('#laborCollectGrid').datagrid('getSelected');
	if(rowData == undefined || rowData.streetName == '合计'){
		$.messager.alert('消息','请选择街道');
	}else{
		//alert(rowData.streetName);
		var isExists = window.mainpage.mainTabs.isExists('劳动力就业情况汇总表（街道）', 'collect/management/laborCollect_street_jump');
		//debugger;
		switch (isExists) {
		    case 0: 
		    	window.mainpage.mainTabs.createTab('劳动力就业情况汇总表（街道）','collect/management/laborCollect_street_jump',
		    	    '', true, true, true, true, {name: 'bindData', params: rowData}); break;
		    case 1: 
		    	window.mainpage.mainTabs.createTab('劳动力就业情况汇总表（街道）','collect/management/laborCollect_street_jump',
		    	    '', true, true, true, true, {name: 'bindData', params: rowData}); break;
		    case 2: 
		    	window.mainpage.mainTabs.jumpTab('劳动力就业情况汇总表（街道）', {name: 'bindData', params: rowData}); break;
		    default: break;
		}
		
	}
}

function exportLaborCollectList(){
	window.location.href ="collect/excel/exportLaborCollect";	
}

